package com.company.genealogy.web.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;

@Data
@TableName("tb_family_news")
public class FamilyNews {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long clanId;
    private String title;
    private String description;
    private String content;
    private String image;
    private String type; // news/event/story
    private Long authorId;
    private String authorName; // 作者名称，数据库字段
    private Integer viewCount;
    private Integer likeCount;
    private Integer status;
    @TableField(exist = false)
    private String clanName; // 非表字段，家族名称
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;
} 